<template>
  <a-modal
    :title="$t(title)"
    :visible="visible"
    @cancel="()=>{visible=!visible}"
    :destroyOnClose="true"
    :keyboard="false"
    :maskClosable="false"
    :width="900"
  >
    <template slot="footer">
      <a-button
        type="primary"
        @click.stop="()=>{visible=false}"
      >{{ $t('back') }}</a-button>
    </template>
    <div style="height:400px">
      <a-textarea
        style="width: 100%;resize:none;"
        :style="!contentStr?'color: rgba(0, 0, 0, 0.25)':''"
        :value="contentStr?contentStr:$t('noData')"
        :rows="18"
        readOnly
      >
      </a-textarea>
    </div>
  </a-modal>
</template>
<script>
export default {
  name: 'ServiceViewModal',
  data () {
    return {
      visible: false
    }
  },
  props: {
    contentStr: {
      type: [String, Object, Array],
      default: ''
    },
    title: {
      type: String,
      default: 'view'
    }
  }
}
</script>
